

#include    <stdio.h>
#include    <stdarg.h>

#include    "zsocket/address.hpp"

#include    "test/logger.hpp"

using namespace    std;
using namespace    zsocket;
using namespace    help;

int    main(int argc, char* argv[])
{
    Logger&    logger = Logger::getInstance();
    
    logger.info("==== test begin ====");
    
    {
        const char*    pszIP = "127.0.0.1";
        int    iPort = 4344;
        Address    address(pszIP, iPort);
        logger.info(__FILE__, __LINE__, "without-lookup -- IP:%s PORT:%d Name:'%s' Address:'%s'", pszIP, iPort, address.getName().c_str(), address.getIPString().c_str());
    }
            
    {
        const char*    pszIP = "127.0.0.1";
        int    iPort = 4344;
        Address    address(pszIP, iPort, true);
        logger.info(__FILE__, __LINE__, "with-lookup -- IP:%s PORT:%d Name:'%s' Address:'%s'", pszIP, iPort, address.getName().c_str(), address.getIPString().c_str());
    }
            
    logger.info("==== test   end ====");
    
    return    0;
}

